package main

import "fmt"

func main() {

}

// 日志结构体
type Log struct {
	name string
	content string
	addtime int64
}

type NetLog struct {
	Log
}

type IOLog struct {
	Log
}

type write interface {
	 echo()
	 out()
}

func (this *Log)writeLog(_write write)  {
	fmt.Println(this.name+ "---" + this.content)
    _write.echo()
	_write.out()
}

type iowrite string
func (this *iowrite)echo()  {
	fmt.Println("iowrite:echo()")
}
func (this *iowrite)out()  {
	fmt.Println("iowrite:out()")
}
type netwrite string

func (this *netwrite)echo()  {
	fmt.Println("netwrite:echo()")
}
func (this *netwrite)out()  {
	fmt.Println("netwrite:out()")
}